import axios from './axios'
import qs from 'qs'
import {appUrl} from '../config/config'
// 登录
export const userLogin = (params) => {
	// console.log(params)
    return new Promise((resolve,reject) => {
        axios({
            url: appUrl + '/agent-center/user/userLogin',
            method: 'post',
            data:qs.stringify(params)
        }).then(res => {
            resolve(res.data)
        })
    });
}
// 手机验证码
export const sendVerficationCode = (params) => {
	// console.log(params)
    return new Promise((resolve,reject) => {
        axios({
            url: appUrl + '/agent-center/user/sendVerficationCode',
            method: 'post',
            data:qs.stringify(params)
        }).then(res => {
            resolve(res.data)
        })
    });
}
// 根据手机号查询审核进度
export const getInvitationByPhone = (params) => {
	// console.log(params)
    return new Promise((resolve,reject) => {
        axios({
            url: appUrl + '/agent-center/invitation/getInvitationByPhone',
            method: 'get',
            params
        }).then(res => {
            resolve(res.data)
        })
    });
}